package com.example.testproject.adapter

import androidx.recyclerview.widget.LinearLayoutManager
import androidx.recyclerview.widget.RecyclerView
import com.chad.library.adapter.base.BaseQuickAdapter
import com.chad.library.adapter.base.BaseViewHolder
import com.example.testproject.R
import com.example.testproject.bean.TikTopBean
import com.example.testproject.rv_layout_manager.CustomLinearLayoutManager

/**
 *
 * @ClassName: MotionLayout9Adapter
 * @Author: android 超级兵
 * @CreateDate: 12/30/21$ 1:08 PM$
 * TODO
 */
class MotionLayout9Adapter(data: List<List<TikTopBean>>?) :
    BaseQuickAdapter<List<TikTopBean>, BaseViewHolder>(R.layout.activity_tik_top, data) {
    override fun convert(helper: BaseViewHolder, item: List<TikTopBean>) {

        val recyclerView = helper.itemView.findViewById<RecyclerView>(R.id.recyclerView)

//        recyclerView.layoutManager = PagerLayoutManager(mContext, LinearLayoutManager.VERTICAL)
        recyclerView.layoutManager = CustomLinearLayoutManager(mContext).apply {
            setScrollEnabled(true)
        }

        recyclerView.adapter = TikTopAdapter(item)
    }
}